package com.flash.mapper;

import com.flash.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {
//    批量插入口味数据
    void insertBatch(List<DishFlavor> flavors);

    /**
     * 删除对应dishId下的口味表的数据
     * @param ids
     */
    void deleteByDishId(List<Long> ids);

    /**
     * 通过dishId获取口味
     * @param id
     * @return
     */
    @Select("select * from dish_flavor where dish_id = #{id} ")
    List<DishFlavor> getByDishId(Long id);
}
